package com.leap.entity.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.leap.config.StringListTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.util.List;

@Data
@Builder
@Schema(description = "发表科普文章的请求接收类")
public class ArticleUploadDTO {

    @Schema(description = "文章id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long articleId;

    @Schema(description = "文章标题")
    private String title;

    @Schema(description = "文章作者")
    private String author;

    @Schema(description = "文章html内容")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<String> html;

    @Schema(description = "文章html内容")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<String> css;

    @Schema(description = "文章分类id")
    private int category;

    @Schema(description = "是否为视频类文章 0图片 1视频")
    private int isVideo;

    @Schema(description = "是否已发布 0未发布 1已发布")
    private int isPublish;

    @Schema(description = "文章的资源地址集合")
    private List<MediaUploadDTO> mediaUrl;



}
